package com.hlbspringcloud.contentcenter.sentineltest;

import com.alibaba.csp.sentinel.slots.block.BlockException;
import lombok.extern.slf4j.Slf4j;

/**
 * @Description:
 * @PROJECT_NAME: spring-cloud-alibaba
 * @CLASS_NAME:
 * @Author: huanglibin
 * @Date: 2020-06-02 22:58
 * @Version: 1.0
 */
@Slf4j
public class TestControllerBlockHandlerClass {
    /**
     * 处理限流或者降级
     * @param a
     * @param e
     * @return
     */
    public static String blockHandler(String a, BlockException e){
        log.warn("限流,或者降级了 block",e);
        return "限流,或者降级了 block";
    }
}
